// ResourceBrowserDlg.cpp : implementation file
//

#include "stdafx.h"
#include "TextureGenerator.h"
#include "ResourceBrowserDlg.h"
//#include "resources.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CResourceBrowserDlg dialog


CResourceBrowserDlg::CResourceBrowserDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CResourceBrowserDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CResourceBrowserDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CResourceBrowserDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CResourceBrowserDlg)
	DDX_Control(pDX, IDOK, m_OKButton);
	DDX_Control(pDX, IDC_RESOURCES, m_ResourcesList);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CResourceBrowserDlg, CDialog)
	//{{AFX_MSG_MAP(CResourceBrowserDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CResourceBrowserDlg message handlers


BOOL CResourceBrowserDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
/*
	int num=numres;
  
  for (int i=0; i<num; i++) {
    CString it;
    it = CString(ID2STRING(resources[i].ID));// + ":   Type " + CString(resources[i].type);
    m_ResourcesList.AddString(it);
  }
  m_ResourcesList.SetCurSel(0);

  if (m_ResourcesList.GetCount()==0) {
    m_OKButton.EnableWindow(FALSE);
    MessageBox("Could not find RES.R64 in current folder.","Error");
  }
  */
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CResourceBrowserDlg::OnOK() 
{
	// TODO: Add extra validation here
  //selected=m_ResourcesList.GetCurSel();
  ok=1;	
	CDialog::OnOK();
}

void CResourceBrowserDlg::OnCancel() 
{
	// TODO: Add extra cleanup here
	ok=0;
	CDialog::OnCancel();
}
